package Code.ForDemo;

import java.util.Scanner;

//统计满足条件的数字
public class Test6 {
    public static void main(String[] args) {
        int count = 0;

        //键盘录入范围
        Scanner scanner  = new Scanner(System.in);
        System.out.print("输入最小值：");
        int x = scanner.nextInt();
        System.out.print("输入最大值：");
        int y = scanner.nextInt();

        for (int i =x ;i<=y;i++){
            if (i%3==0&&i%5==0){
                count++;
            }
        }
        System.out.println(count);
    }
}
